package ua.ck.example.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ua.ck.example.dao.CategoryDAO;
import ua.ck.example.domain.Category;

@Service("categoryService")
public class CategoryServiceImpl implements CategoryService {
	@Autowired
	private CategoryDAO categoryDAO;

	@Override
	@Transactional
	public List<Category> listCategories() {
		return categoryDAO.listCategories();
	}

	@Override
	@Transactional
	public void addCategory(Category category) {
		categoryDAO.addCategory(category);
	}

}
